<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>动态高度</title>
    <style>
        .head {
            width:800px;
            display: flex;
            justify-content: space-between;
            border: 1px solid green;
        }
        .left {
            width:100px;
            height: 100px;
            border: 1px solid red;
        }
        .right {
            width:300px;
            height: 100px;
            border: 1px solid red;
        }
    </style>
</head>
<body>
    <div class="head">
        <div class="left">左</div>
        <div class="right">右</div>
    </div>
</body>
</html>